package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.GoodsSpecConfigBean;
import com.molichuxing.services.property.GoodsTypeEnum;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品规格配置表 Mapper 接口
 * </p>
 *
 * @author xuelin yi
 * @since 2019-08-12
 */
public interface GoodsSpecConfigMapper extends RootMapper<GoodsSpecConfigBean> {

    /**
     * 根据规格的id和商品类型查询规格信息
     * @param specListId
     * @return
     */
    List<GoodsSpecConfigBean> getBatchIds(@Param("specListId") List<Integer> specListId);

    /**
     * 根据规格的id和商品类型查询规格信息
     * @param properties
     * @return
     */
    List<GoodsSpecConfigBean> getGoodsSpecProperties(@Param("properties") List<Integer> properties, @Param("goodsSpecList") List<String> goodsSpecList, @Param("type") Integer goodsType);

    /**
     * 根据规格的key和商品类型查询规格信息
     * @param specList
     * @param type
     * @return
     */
    List<GoodsSpecConfigBean> selectList(@Param("specList")List<String> specList, @Param("type")int type);
}
